<?php
$names = array(
          'Andrew',
          'John',
          'Peter',
          'Nastin',
          'Bill');
$output = preg_grep('/^[A-N]/', $names);
print_r( $output );
